<template>
  <div class="item-info">
    <div class="title">{{ itemInfo.title }}</div>
    <div class="price">
      <span class="new-price">{{ itemInfo.price }}</span>
      <span class="old-price">{{ itemInfo.oldPrice }}</span>
      <span class="sell">{{ itemInfo.discountDesc }}</span>
    </div>
    <div class="columns">
      <span>{{ result.columns[0] }}</span>
      <span>{{ result.columns[1] }}</span>
      <span>{{
        result.shopInfo.services[result.shopInfo.services.length - 1].name
      }}</span>
    </div>
    <div class="service">
      <div v-for="(service, index) in result.shopInfo.services" :key="index">
        <img v-lazy="service.icon" />
        <span>{{ service.name }}</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: ["itemInfo", "result"],
};
</script>

<style scoped>
.title {
  font-size: 18px;
  color: black;
  margin: 10px;
}
.price {
  margin-left: 10px;
}
.new-price {
  font-size: 25px;
  color: #f13e3a;
}
.old-price {
  font-size: 12px;
  text-decoration: line-through;
  margin-left: 5px;
}
.sell {
  background-color: #f13e3a;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  margin-left: 5px;
  position: relative;
  top: -8px;
}
.columns {
  margin-top: 15px;
  line-height: 30px;
  display: flex;
  font-size: 13px;
  border-bottom: 1px solid rgba(100, 100, 100, 0.1);
  justify-content: space-between;
}
.service {
  height: 60px;
  margin-top: 15px;
  line-height: 60px;
  display: flex;
  font-size: 11px;
  border-bottom: 5px solid rgba(100, 100, 100, 0.1);
  justify-content: space-between;
}
.service img {
  width: 13px;
  height: 13px;
}
</style>
